
package com.project.projectA.core.converter;

import org.apache.commons.beanutils.Converter;

/**
 * 字符串类型转换器.
 *
 * @author wuwei
 */
public final class StringConverter implements Converter {

	/**
	 * Instantiates a new string converter.
	 */
	public StringConverter() {
	}

	/* (non-Javadoc)
	 * @see org.apache.commons.beanutils.Converter#convert(java.lang.Class, java.lang.Object)
	 */
	@SuppressWarnings({ "rawtypes" })
	public Object convert(Class type, Object value) {
		if (value == null) {
			return (String) null;
		} else {
			return value.toString();
		}
	}

}
